#!/usr/bin/env python
# -*- coding:utf-8 -*-
def min_max(list):
    x = 0
    n = len(list)
    while x < n:
        x = x + 1
        min = list[0]
        for i in list:
            if i <= min:
                min = i
        list_new.append(min)
        list.remove(min)	
if __name__ == '__main__':
    list_new = []
    list=[8,4,3,7,9,4,9,1,2]
    min_max(list)
    print(list_new)	